﻿/* ==============================================================================
  * Description：
  * By Se7en
  * Creation Time：[2013-09-25 11:06:39]
  * @version 1.0
  * ==============================================================================*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BML.Infrastructure;
using BML.Infrastructure.Implement;
using Model.BusinessLogic.PhysicalData;
using Model.Manager;
using Model.Manager.DataBase;

namespace BML
{
    /// <summary>
    /// TagOp
    /// Description：
    /// </summary>
    public class TagOp : BaseOperator
    {
        public void PatchAdd(IEnumerable<Tag> list)
        {
            using (IDbContext db = ContextFactory.GetBlConn())
            {
                var op = db.GetOperator<Tag>();
                foreach (var tag in list)
                {
                    Create(op, tag);
                }
                Delete(op, m => m.Name == "1");


                db.SaveAllChange();
            }
        }





    }
}
